< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03120103.xhp

(section: str) (bookmark: bm_id3143272)
Str function

Str 関数

Str Function [Runtime]
Str 関数 [実行時](hd_id3143272.1)

Converts a numeric expression into a string.
数値表式を文字列に変換します。(par_id3155100.2)

(/section: str)

Syntax:
構文:(hd_id3109850.3)

Str (Expression)
Str (Expression)(par_id3149497.4)

Return value:
戻り値:(hd_id3150040.5)

String
文字列(par_id3146117.6)

Parameters:
パラメータ:(hd_id3155805.7)

Expression: Any numeric expression.
Expression:任意の数値表式。(par_id3149178.8)

The Str function converts a numeric variable, or the result of a calculation into a string. Negative numbers are preceded by a minus sign. Positive numbers are preceded by a space (instead of the plus sign).
Str 関数は、数値変数および数値演算の結果を、文字列に変換します。負の値にはマイナス記号が付きます。正の値にはスペース記号が付きます (プラス記号は付きません)。(par_id3146958.9)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3155419.10)

Sub ExampleStr
Sub ExampleStr(par_id3149514.11)

Dim iVar As Single
Dim iVar As Single(par_id3150771.12)

Dim sVar As String
Dim sVar As String(par_id3153626.13)

iVar = 123.123
iVar = 123.123(par_id3145069.14)

sVar = LTrim(Str(iVar))
sVar = LTrim(Str(iVar))(par_id3153897.15)

Msgbox sVar & chr(13) & Str(iVar)
Msgbox sVar & chr(13) & Str(iVar)(par_id3154924.16)

end sub
end sub(par_id3152811.17)


< Prev / Next >